﻿<UserControl
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:properties="clr-namespace:KBS.FamilyLines.Properties" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d" x:Class="KBS.FamilyLines.Welcome">
    <UserControl.Resources>
        <DataTemplate x:Key="RecentFilesDataTemplate">
            <Button Content="{TemplateBinding Content}"/>
        </DataTemplate>

    </UserControl.Resources>
    <StackPanel>

        <!-- Header -->
        <Border MinWidth="300" Width="Auto" Padding="5,0,5,0" Opacity="0.8" Background="{DynamicResource WelcomeBackgroundBrush}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1,1,1,0" CornerRadius="{DynamicResource AboutBorderTopCorner}" HorizontalAlignment="Center" >
            <Grid>
                <Rectangle Fill="{DynamicResource WelcomeHeaderBg}" Height="69"/>
                <TextBlock Padding="4,0,0,0" Text="{x:Static properties:Resources.Welcome}"  TextWrapping="Wrap" Foreground="{DynamicResource WelcomeHeaderFontColor}" FontSize="18" FontWeight="Bold" d:LayoutOverrides="Height" HorizontalAlignment="Left" Margin="3.5,0,0,2" VerticalAlignment="Bottom"/>
            </Grid>
        </Border>

        <!-- Content -->
        <Border MinWidth="300" Width="Auto" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1,1,1,1">
            <Grid Margin="0,0,0,0" Background="{DynamicResource InputBackgroundBrush}">

                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <StackPanel HorizontalAlignment="Stretch" Margin="5,20,5,10">
                    <Button Margin="0,0,0,5" x:Name="NewButton" Content="{x:Static properties:Resources.NewMenu}" Click="NewButton_Click" IsDefault="True" HorizontalAlignment="Stretch" Style="{DynamicResource WelcomeButtonStyle}" Width="Auto"/>
                    <Button Margin="0,0,0,5" x:Name="OpenButton" Content="{x:Static properties:Resources.OpenMenu}" Click="OpenButton_Click" HorizontalAlignment="Stretch" Style="{DynamicResource WelcomeButtonStyle}" Width="Auto"/>
                    <Button Margin="0,0,0,5" x:Name="ImportButton" Content="{x:Static properties:Resources.GedcomMenu}" Click="ImportButton_Click" HorizontalAlignment="Stretch" Style="{DynamicResource WelcomeButtonStyle}" Width="Auto"/>
                </StackPanel>

                <GridSplitter IsEnabled="False" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Height="1" Background="#FF3D4976" Margin="2,0,2,0"/>

                <Label Content="{x:Static properties:Resources.OpenRecent}" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Row="1" Margin="10,0,0,0" Foreground="{DynamicResource WelcomeHeaderFontColor}" />

                <StackPanel MaxWidth="280" VerticalAlignment="Stretch" Grid.Row="1" x:Name="RecentFilesStackPanel" Margin="5,30,5,10"/>

            </Grid>
        </Border>

        <!-- Footer -->
        <Border Background="{DynamicResource BackgroundBrush}" Height="30" Opacity="0.8" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1,0,1,1" CornerRadius="{DynamicResource AboutBorderBottomCorner}">
            <Label x:Name="VersionLabel" Margin="10,0,0,0" Foreground="{DynamicResource FontColor}" Content="{x:Static properties:Resources.Version}"/>
        </Border>

    </StackPanel>
</UserControl>
